package shell.command;

import java.io.PrintStream;

/**
 * Commande echo.
 * 
 * @version 1.0
 */
public final class EchoCommandImpl extends ShellCommandImpl {
    /**
     * Constructeur.
     * 
     * @param context
     *            Contexte d'exécution.
     */
    public EchoCommandImpl(final ShellContext context) {
	super(context);
    }

    /**
     * @see shell.command.ShellCommand#getName().
     */
    public String getName() {
	return "echo";
    }

    /**
     * @see shell.command.ShellCommand#getUsage().
     */
    public String getUsage() {
	return "echo <messages>";
    }

    /**
     * @see shell.command.ShellCommand#getShortDescription().
     */
    public String getShortDescription() {
	return "Echo messages";
    }

    /**
     * @see shell.command.ShellCommand#execute(java.lang.String,
     *      java.io.PrintStream, java.io.PrintStream).
     */
    public void execute(final String cmdline, final PrintStream out,
	    final PrintStream err) {
	out.println(cmdline);
    }
}
